package com.kun.entity;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.sun.istack.internal.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author fangkun
 * @create 2023-02-06-9:59
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@JacksonXmlRootElement(localName = "User")
@ApiModel(description="用户实体")
public class User {

    @JacksonXmlProperty(localName = "id")
    @ApiModelProperty("用户编号")
    private Long id;

    @NotNull
    @JacksonXmlProperty(localName = "name")
    @ApiModelProperty("用户姓名")
    private String name;

    @JacksonXmlProperty(localName = "age")
    @ApiModelProperty("用户年龄")
    private Integer age;
}
